package com.by.controller;

import com.by.entity.ResultBean;
import com.by.entity.Spu;
import com.by.vo.SpuVo;
import com.by.service.ProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author 江俊俊
 * @version 1.0
 * @description
 * @date 2025/4/11 10:08
 * @since JDK1.8
 */
@RestController
@RequestMapping("/api")
@Api(tags = "商品管理")
public class ProductController extends BaseController{


    @Autowired
    ProductService  productService;

    @ApiOperation("保存商品信息")
    @PostMapping(value = "/saveAttr")
    public ResultBean saveAttr(@RequestBody Spu spu){


        int i = productService.saveProduct(spu);
        return saveResult(i);



    }





}
